package com.yuantu.judiciary.model.vo;

import com.yuantu.judiciary.model.dto.EntShareholderDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

/**
 * 企业股东信息
 *
 * @author syw
 * @since 2023-07-20
 **/
@Data
@ApiModel("企业股东信息")
@Builder
public class EntShareholderVO {
    @ApiModelProperty("出资日期") private String condate;
    @ApiModelProperty("认缴出资额（万元）") private String subconam;
    @ApiModelProperty("出资比例") private String fundedratio;
    @ApiModelProperty("股东类型代码") private String invtypecode;
    @ApiModelProperty("股东类型") private String invtype;
    @ApiModelProperty("出资方式代码") private String conformcode;
    @ApiModelProperty("出资方式") private String conform;
    @ApiModelProperty("认缴出资币种代码") private String currencycode;
    @ApiModelProperty("认缴出资币种") private String regcapcur;
    @ApiModelProperty("股东名称") private String shaname;
    @ApiModelProperty("股东统一社会信用代码") private String creditcode;
    @ApiModelProperty("股东注册号") private String regno;
    @ApiModelProperty("实缴出资额（万元）") private String acconam;

    public static EntShareholderVO getEntShareholder(EntShareholderDTO data) {
        return EntShareholderVO.builder()
                .condate(data.getCONDATE())
                .subconam(data.getSUBCONAM())
                .fundedratio(data.getFUNDEDRATIO())
                .invtypecode(data.getINVTYPECODE())
                .invtype(data.getINVTYPE())
                .conformcode(data.getCONFORMCODE())
                .conform(data.getCONFORM())
                .currencycode(data.getCURRENCYCODE())
                .regcapcur(data.getREGCAPCUR())
                .shaname(data.getSHANAME())
                .creditcode(data.getCREDITCODE())
                .regno(data.getREGNO())
                .acconam(data.getACCONAM())
                .build();
    }

}
